#include <stdio.h>
#include <string.h>
#include <stdbool.h>

bool validPalindrome(char* s)
{
    int len = strlen(s);
    int strat = 0;
    int end = len - 1;
    int flag = 0;
    while(strat < end)
    {
        if(s[strat] != s[end] )//aaaaaaaacaa
        {
            if(s[strat + 1] != s[end ] && s[strat ] != s[end -1])
                return false;
            flag += 1;
        }
        strat++;
        end--;
    }
    return true && flag <= 1;
}

int main()
{
    char s[] = "aaaaaaaacaa";
    if(validPalindrome(s))
    {
        printf("okkkk\n");
    }
    else
        printf("nooooo\n");
    return 0;
}